import { createRouter, createWebHistory } from 'vue-router';

// 静态导入组件
import Index from '../views/index.vue';
import Layout from '../views/layout.vue';
import introducing from '../views/userManagement/introducing.vue';
import Scheduling from '../views/userManagement/scheduling.vue';
import Feedback from '../views/feedback.vue';
import Booking from '../views/booking/booking.vue';
import DataAnalysis from '../views/dataAnalysis/dataAnalysis.vue';

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      component: Index // 使用静态导入的组件
    },
    {
      path: '/layout',
      component: Layout, // 使用静态导入的组件
      redirect: '/layout/introducing',
      children: [
        {
          path: 'introducing',
          component: introducing // 使用静态导入的组件
        },
        {
          path: 'scheduling',
          component:Scheduling  // 使用静态导入的组件
        },
        {
          path: 'feedback',
          component: Feedback // 使用静态导入的组件
        },
        {
          path: 'booking',
          component: Booking // 使用静态导入的组件
        },
        {
          path: 'dataAnalysis',
          component: DataAnalysis // 使用静态导入的组件
        }
      ]
    }
  ]
});


export default router;
